<template>
  <div id="app" element-loading-text="欢迎使用DOCKER容器可视化管理系统"
    element-loading-spinner="el-icon-loading"
    element-loading-background="rgba(0, 0, 0, 0.8)" v-loading.fullscreen.lock="loading">
     <router-view />
  </div>
</template>

<script>
import fast from '@/utils/store'
export default {
  data () {
    return {
      user: null, // 登录用户信息
      loading:false,
    }
  },
  mounted () {
    this.user = JSON.parse(localStorage.getItem('user'))
    this.loading = true;
    // 获取最新版本
    this.fetchEdition()
    setTimeout(()=>{
      this.loading = false;
    },1000)
  },
  methods: {
    // 获取最新版本
    fetchEdition () {
      let requestOptions = {
        method: 'GET',
        time: 60000,
        redirect: 'follow'
      }
      fetch(fast.appversion, requestOptions)
        .then(response => response.text())
        .then(res => {
          this.$store.commit('changeNewEdition', JSON.parse(res).Data)
        })
        .catch(error => {
          return error
        })
    }
  }
}
</script>

<style lang="scss">
html,
body {
  height: 100%;
  background: #F2F2F2;
}
#app {
  height: 100%;
  min-width: 1300px;
}
.navicon{
  font-size: 20px !important;
}
.clearfix::after{
  content: '\20';
  height: 0;
  display: block;
  clear: both;
}
//element 
//index 页下的选择语言
.changeLang {
  flex-grow:  1;
  box-sizing: border-box;
  padding: 0px 10px;
  .el-select{
    background: #067fb5;
    .el-input__inner{
      background: #067fb5;
      color: white;
      border: none;
      width: 120px;
      text-align: center;
    }
  }
  
}

//flex
.flex0 {
  flex-shrink: 0;
}
.flex1 {
  flex: 1;
}
.flex_r {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}
.flex_r_start {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
}
.flex_r_center {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.flex_r_between {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.flex_r_between_start {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
}
.flex_r_around {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}
.flex_c {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.flex_c_start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.flex_c_center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.flex_c_between {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}
.flex_c_end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}
.limit3 {
  word-wrap: break-word;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
//margin
.margin6{
  margin-top: 6px;
}
.margin10{
  margin-top: 10px;
}
.margin20{
  margin-top: 20px;
}
.margin40{
  margin-top: 40px;
}
.marginl10{
  margin-left: 10px;
}
.marginl40{
  margin-left: 40px;
}
// other
.tips{
  font-size: 12px;
  color: gray;
}
</style>
